//
//  ViewController.m
//  OCR_Tesseract_Demo
//
//  Created by 谭鹏 on 2017/6/30.
//  Copyright © 2017年 谭鹏. All rights reserved.
//

#import "ViewController.h"
#import  <Masonry.h>
#import "TPScanViewController.h"
@interface ViewController ()<UITableViewDelegate,UITableViewDataSource>
@property UITableView * tableView;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    _tableView = [UITableView new];
    _tableView.dataSource = self;
    _tableView.delegate = self;
    
    [self.view addSubview:_tableView];
    [_tableView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(self.view);
    }];
    
    
}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 1;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    UITableViewCell * cell = [UITableViewCell new];
    cell.textLabel.text = @"OCR";
    return  cell;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    TPScanViewController * scan = [TPScanViewController new];
    [self presentViewController:scan animated:YES completion:nil];
}
//
//- (void)progressImageRecognitionForTesseract:(G8Tesseract *)tesseract {
//    NSLog(@"progress: %lu", (unsigned long)tesseract.progress);
//}
//
//- (BOOL)shouldCancelImageRecognitionForTesseract:(G8Tesseract *)tesseract {
//    return NO;  // return YES, if you need to interrupt tesseract before it finishes
//}

@end
